package appconfig

import (
	"fmt"
	"github.com/spf13/viper"
)

type AppConfig struct {
	SendSmsCode
}

type SendSmsCode struct {
	AccessKeyId     string
	AccessKeySecret string
}

var AppData AppConfig

func InitAppConfig() {
	viper.SetConfigFile("./appconfig/config.yaml")
	err := viper.ReadInConfig()
	if err != nil {
		fmt.Println("动态文件获取失败", err)
		return
	}
	viper.Unmarshal(&AppData)
	fmt.Println("动态文件获取成功", AppData)

}
